@extends('layouts.admin')
@section('content')
	<style>
		.table tbody tr td{
			text-align:center;
		}
		.dataTables_filter{
			margin-left:20px;
		}
		form input{
			height:22px;
			text-align: center;
			line-height:20px;
			font-size:15px;
		}
		#tbody tr td img{
			height:80px;
			width:100px;
			margin:0px;
		}
		#tbody tr td{
			line-height:80px;
		}
	</style>

		<div id="content-header">
			<h1>Tables</h1>
			<div class="btn-group">
				<a class="btn btn-large tip-bottom" title="Manage Files"><i class="icon-file"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Users"><i class="icon-user"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Comments"><i class="icon-comment"></i><span class="label label-important">5</span></a>
				<a class="btn btn-large tip-bottom" title="Manage Orders"><i class="icon-shopping-cart"></i></a>
			</div>
		</div>
		<div id="breadcrumb">
			<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
			<a href="#" class="current">Tables</a>
		</div>
		<div class="dataTables_filter" id="DataTables_Table_0_filter">
			<form action="{{url('admin/LabelList')}}" method="get" enctype="multipart/form-data">
				{{csrf_field()}}
				<input type="text" name="search" value="" placeholder="请输入标签名称" >
				<input type="submit"value="搜索">
			</form>
		</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span12">
					<div class="widget-box">
						<div class="widget-title">
								<span class="icon">
									<i class="icon-th"></i>
								</span>
							<h5>标签列表</h5>
						</div>
						<div class="widget-content nopadding">
							<table class="table table-bordered table-striped">
								<thead>
								<tr>
									<th>标签ID</th>
									<th>标签名称</th>
									<th>操作</th>
								</tr>
								</thead>
								<tbody id="tbody">
								@foreach($result as $sing)
								<tr>
									<td>{{$sing->id}}</td>
									<td>{{$sing->name}}</td>
									<td>
										<a href="{{url('admin/LabelEdit?id=').$sing->id.'&page='}}{{isset($_GET['page'])?$_GET['page']:1}}&search={{isset($_GET['search'])?$_GET['search']:''}}"  class="btn btn-primary">修改</a>
										<a href="{{url('admin/LabelDel?id=').$sing->id.'&page='}}{{isset($_GET['page'])?$_GET['page']:1}}&search={{isset($_GET['search'])?$_GET['search']:''}}"  class="btn btn-primary">删除</a>
									</td>
								</tr>
								@endforeach
								</tbody>
							</table>
							<div class="dataTables_paginate">

								{{$result->appends(['search' => isset($_GET['search'])?$_GET['search']:''])->links('admin.page')}}
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="row-fluid">
				<div id="footer" class="span12">
					2012 &copy; Unicorn Admin. Brought to you by <a href="https://wrapbootstrap.com/user/diablo9983">diablo9983</a>
				</div>
			</div>
		</div>
@endsection